\(\int \frac {\sec ^{12}(c+d x)}{(a+i a \tan (c+d x))^8} \, dx\) [167]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 24, antiderivative size = 126 \[ \int \frac {\sec ^{12}(c+d x)}{(a+i a \tan (c+d x))^8} \, dx=\frac {80 x}{a^8}+\frac {80 i \log (\cos (c+d x))}{a^8 d}-\frac {31 \tan (c+d x)}{a^8 d}+\frac {4 i \tan ^2(c+d x)}{a^8 d}+\frac {\tan ^3(c+d x)}{3 a^8 d}+\frac {16 i}{d \left (a^4+i a^4 \tan (c+d x)\right )^2}-\frac {80 i}{d \left (a^8+i a^8 \tan (c+d x)\right )} \]

[Out]

80*x/a^8+80*I*ln(cos(d*x+c))/a^8/d-31*tan(d*x+c)/a^8/d+4*I*tan(d*x+c)^2/a^8/d+1/3*tan(d*x+c)^3/a^8/d+16*I/d/(a
^4+I*a^4*tan(d*x+c))^2-80*I/d/(a^8+I*a^8*tan(d*x+c))

Rubi [A] (verified)

Time = 0.11 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3568, 45} \[ \int \frac {\sec ^{12}(c+d x)}{(a+i a \tan (c+d x))^8} \, dx=\frac {\tan ^3(c+d x)}{3 a^8 d}+\frac {4 i \tan ^2(c+d x)}{a^8 d}-\frac {31 \tan (c+d x)}{a^8 d}-\frac {80 i}{d \left (a^8+i a^8 \tan (c+d x)\right )}+\frac {80 i \log (\cos (c+d x))}{a^8 d}+\frac {80 x}{a^8}+\frac {16 i}{d \left (a^4+i a^4 \tan (c+d x)\right )^2} \]

[In]

Int[Sec[c + d*x]^12/(a + I*a*Tan[c + d*x])^8,x]

[Out]

(80*x)/a^8 + ((80*I)*Log[Cos[c + d*x]])/(a^8*d) - (31*Tan[c + d*x])/(a^8*d) + ((4*I)*Tan[c + d*x]^2)/(a^8*d) +
 Tan[c + d*x]^3/(3*a^8*d) + (16*I)/(d*(a^4 + I*a^4*Tan[c + d*x])^2) - (80*I)/(d*(a^8 + I*a^8*Tan[c + d*x]))

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 3568

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rubi steps \begin{align*} \text {integral}& = -\frac {i \text {Subst}\left (\int \frac {(a-x)^5}{(a+x)^3} \, dx,x,i a \tan (c+d x)\right )}{a^{11} d} \\ & = -\frac {i \text {Subst}\left (\int \left (-31 a^2+8 a x-x^2+\frac {32 a^5}{(a+x)^3}-\frac {80 a^4}{(a+x)^2}+\frac {80 a^3}{a+x}\right ) \, dx,x,i a \tan (c+d x)\right )}{a^{11} d} \\ & = \frac {80 x}{a^8}+\frac {80 i \log (\cos (c+d x))}{a^8 d}-\frac {31 \tan (c+d x)}{a^8 d}+\frac {4 i \tan ^2(c+d x)}{a^8 d}+\frac {\tan ^3(c+d x)}{3 a^8 d}+\frac {16 i}{d \left (a^4+i a^4 \tan (c+d x)\right )^2}-\frac {80 i}{d \left (a^8+i a^8 \tan (c+d x)\right )} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.84 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.70 \[ \int \frac {\sec ^{12}(c+d x)}{(a+i a \tan (c+d x))^8} \, dx=-\frac {i \left (-93 i \tan (c+d x)-12 \tan ^2(c+d x)+i \tan ^3(c+d x)+48 \left (5 \log (i-\tan (c+d x))+\frac {-4-5 i \tan (c+d x)}{(-i+\tan (c+d x))^2}\right )\right )}{3 a^8 d} \]

[In]

Integrate[Sec[c + d*x]^12/(a + I*a*Tan[c + d*x])^8,x]

[Out]

((-1/3*I)*((-93*I)*Tan[c + d*x] - 12*Tan[c + d*x]^2 + I*Tan[c + d*x]^3 + 48*(5*Log[I - Tan[c + d*x]] + (-4 - (
5*I)*Tan[c + d*x])/(-I + Tan[c + d*x])^2)))/(a^8*d)

Maple [A] (verified)

Time = 0.52 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.95

method result size
risch \(-\frac {32 i {\mathrm e}^{-2 i \left (d x +c \right )}}{a^{8} d}+\frac {4 i {\mathrm e}^{-4 i \left (d x +c \right )}}{a^{8} d}+\frac {160 x}{a^{8}}+\frac {160 c}{a^{8} d}-\frac {4 i \left (36 \,{\mathrm e}^{4 i \left (d x +c \right )}+81 \,{\mathrm e}^{2 i \left (d x +c \right )}+47\right )}{3 d \,a^{8} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}+\frac {80 i \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{a^{8} d}\) \(120\)
derivativedivides \(-\frac {31 \tan \left (d x +c \right )}{a^{8} d}+\frac {\tan ^{3}\left (d x +c \right )}{3 a^{8} d}+\frac {4 i \left (\tan ^{2}\left (d x +c \right )\right )}{a^{8} d}+\frac {80 \arctan \left (\tan \left (d x +c \right )\right )}{a^{8} d}-\frac {40 i \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{a^{8} d}-\frac {80}{a^{8} d \left (\tan \left (d x +c \right )-i\right )}-\frac {16 i}{a^{8} d \left (\tan \left (d x +c \right )-i\right )^{2}}\) \(123\)
default \(-\frac {31 \tan \left (d x +c \right )}{a^{8} d}+\frac {\tan ^{3}\left (d x +c \right )}{3 a^{8} d}+\frac {4 i \left (\tan ^{2}\left (d x +c \right )\right )}{a^{8} d}+\frac {80 \arctan \left (\tan \left (d x +c \right )\right )}{a^{8} d}-\frac {40 i \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{a^{8} d}-\frac {80}{a^{8} d \left (\tan \left (d x +c \right )-i\right )}-\frac {16 i}{a^{8} d \left (\tan \left (d x +c \right )-i\right )^{2}}\) \(123\)

[In]

int(sec(d*x+c)^12/(a+I*a*tan(d*x+c))^8,x,method=_RETURNVERBOSE)

[Out]

-32*I/a^8/d*exp(-2*I*(d*x+c))+4*I/a^8/d*exp(-4*I*(d*x+c))+160*x/a^8+160/a^8/d*c-4/3*I*(36*exp(4*I*(d*x+c))+81*
exp(2*I*(d*x+c))+47)/d/a^8/(exp(2*I*(d*x+c))+1)^3+80*I/a^8/d*ln(exp(2*I*(d*x+c))+1)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 199, normalized size of antiderivative = 1.58 \[ \int \frac {\sec ^{12}(c+d x)}{(a+i a \tan (c+d x))^8} \, dx=\frac {4 \, {\left (120 \, d x e^{\left (10 i \, d x + 10 i \, c\right )} + 60 \, {\left (6 \, d x - i\right )} e^{\left (8 i \, d x + 8 i \, c\right )} + 30 \, {\left (12 \, d x - 5 i\right )} e^{\left (6 i \, d x + 6 i \, c\right )} + 10 \, {\left (12 \, d x - 11 i\right )} e^{\left (4 i \, d x + 4 i \, c\right )} - 60 \, {\left (-i \, e^{\left (10 i \, d x + 10 i \, c\right )} - 3 i \, e^{\left (8 i \, d x + 8 i \, c\right )} - 3 i \, e^{\left (6 i \, d x + 6 i \, c\right )} - i \, e^{\left (4 i \, d x + 4 i \, c\right )}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 15 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i\right )}}{3 \, {\left (a^{8} d e^{\left (10 i \, d x + 10 i \, c\right )} + 3 \, a^{8} d e^{\left (8 i \, d x + 8 i \, c\right )} + 3 \, a^{8} d e^{\left (6 i \, d x + 6 i \, c\right )} + a^{8} d e^{\left (4 i \, d x + 4 i \, c\right )}\right )}} \]

[In]

integrate(sec(d*x+c)^12/(a+I*a*tan(d*x+c))^8,x, algorithm="fricas")

[Out]

4/3*(120*d*x*e^(10*I*d*x + 10*I*c) + 60*(6*d*x - I)*e^(8*I*d*x + 8*I*c) + 30*(12*d*x - 5*I)*e^(6*I*d*x + 6*I*c
) + 10*(12*d*x - 11*I)*e^(4*I*d*x + 4*I*c) - 60*(-I*e^(10*I*d*x + 10*I*c) - 3*I*e^(8*I*d*x + 8*I*c) - 3*I*e^(6
*I*d*x + 6*I*c) - I*e^(4*I*d*x + 4*I*c))*log(e^(2*I*d*x + 2*I*c) + 1) - 15*I*e^(2*I*d*x + 2*I*c) + 3*I)/(a^8*d
*e^(10*I*d*x + 10*I*c) + 3*a^8*d*e^(8*I*d*x + 8*I*c) + 3*a^8*d*e^(6*I*d*x + 6*I*c) + a^8*d*e^(4*I*d*x + 4*I*c)
)

Sympy [F]

\[ \int \frac {\sec ^{12}(c+d x)}{(a+i a \tan (c+d x))^8} \, dx=\frac {\int \frac {\sec ^{12}{\left (c + d x \right )}}{\tan ^{8}{\left (c + d x \right )} - 8 i \tan ^{7}{\left (c + d x \right )} - 28 \tan ^{6}{\left (c + d x \right )} + 56 i \tan ^{5}{\left (c + d x \right )} + 70 \tan ^{4}{\left (c + d x \right )} - 56 i \tan ^{3}{\left (c + d x \right )} - 28 \tan ^{2}{\left (c + d x \right )} + 8 i \tan {\left (c + d x \right )} + 1}\, dx}{a^{8}} \]

[In]

integrate(sec(d*x+c)**12/(a+I*a*tan(d*x+c))**8,x)

[Out]

Integral(sec(c + d*x)**12/(tan(c + d*x)**8 - 8*I*tan(c + d*x)**7 - 28*tan(c + d*x)**6 + 56*I*tan(c + d*x)**5 +
 70*tan(c + d*x)**4 - 56*I*tan(c + d*x)**3 - 28*tan(c + d*x)**2 + 8*I*tan(c + d*x) + 1), x)/a**8

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.68 \[ \int \frac {\sec ^{12}(c+d x)}{(a+i a \tan (c+d x))^8} \, dx=-\frac {\frac {48 \, {\left (5 \, \tan \left (d x + c\right )^{6} - 29 i \, \tan \left (d x + c\right )^{5} - 70 \, \tan \left (d x + c\right )^{4} + 90 i \, \tan \left (d x + c\right )^{3} + 65 \, \tan \left (d x + c\right )^{2} - 25 i \, \tan \left (d x + c\right ) - 4\right )}}{a^{8} \tan \left (d x + c\right )^{7} - 7 i \, a^{8} \tan \left (d x + c\right )^{6} - 21 \, a^{8} \tan \left (d x + c\right )^{5} + 35 i \, a^{8} \tan \left (d x + c\right )^{4} + 35 \, a^{8} \tan \left (d x + c\right )^{3} - 21 i \, a^{8} \tan \left (d x + c\right )^{2} - 7 \, a^{8} \tan \left (d x + c\right ) + i \, a^{8}} - \frac {\tan \left (d x + c\right )^{3} + 12 i \, \tan \left (d x + c\right )^{2} - 93 \, \tan \left (d x + c\right )}{a^{8}} + \frac {240 i \, \log \left (i \, \tan \left (d x + c\right ) + 1\right )}{a^{8}}}{3 \, d} \]

[In]

integrate(sec(d*x+c)^12/(a+I*a*tan(d*x+c))^8,x, algorithm="maxima")

[Out]

-1/3*(48*(5*tan(d*x + c)^6 - 29*I*tan(d*x + c)^5 - 70*tan(d*x + c)^4 + 90*I*tan(d*x + c)^3 + 65*tan(d*x + c)^2
 - 25*I*tan(d*x + c) - 4)/(a^8*tan(d*x + c)^7 - 7*I*a^8*tan(d*x + c)^6 - 21*a^8*tan(d*x + c)^5 + 35*I*a^8*tan(
d*x + c)^4 + 35*a^8*tan(d*x + c)^3 - 21*I*a^8*tan(d*x + c)^2 - 7*a^8*tan(d*x + c) + I*a^8) - (tan(d*x + c)^3 +
 12*I*tan(d*x + c)^2 - 93*tan(d*x + c))/a^8 + 240*I*log(I*tan(d*x + c) + 1)/a^8)/d

Giac [A] (verification not implemented)

none

Time = 1.98 (sec) , antiderivative size = 224, normalized size of antiderivative = 1.78 \[ \int \frac {\sec ^{12}(c+d x)}{(a+i a \tan (c+d x))^8} \, dx=-\frac {2 \, {\left (-\frac {120 i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a^{8}} + \frac {240 i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}{a^{8}} - \frac {120 i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a^{8}} + \frac {220 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 93 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 684 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 190 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 684 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 93 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 220 i}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3} a^{8}} + \frac {4 \, {\left (-125 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 536 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 846 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 536 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 125 i\right )}}{a^{8} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{4}}\right )}}{3 \, d} \]

[In]

integrate(sec(d*x+c)^12/(a+I*a*tan(d*x+c))^8,x, algorithm="giac")

[Out]

-2/3*(-120*I*log(tan(1/2*d*x + 1/2*c) + 1)/a^8 + 240*I*log(tan(1/2*d*x + 1/2*c) - I)/a^8 - 120*I*log(tan(1/2*d
*x + 1/2*c) - 1)/a^8 + (220*I*tan(1/2*d*x + 1/2*c)^6 - 93*tan(1/2*d*x + 1/2*c)^5 - 684*I*tan(1/2*d*x + 1/2*c)^
4 + 190*tan(1/2*d*x + 1/2*c)^3 + 684*I*tan(1/2*d*x + 1/2*c)^2 - 93*tan(1/2*d*x + 1/2*c) - 220*I)/((tan(1/2*d*x
 + 1/2*c)^2 - 1)^3*a^8) + 4*(-125*I*tan(1/2*d*x + 1/2*c)^4 - 536*tan(1/2*d*x + 1/2*c)^3 + 846*I*tan(1/2*d*x +
1/2*c)^2 + 536*tan(1/2*d*x + 1/2*c) - 125*I)/(a^8*(tan(1/2*d*x + 1/2*c) - I)^4))/d

Mupad [B] (verification not implemented)

Time = 3.81 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.90 \[ \int \frac {\sec ^{12}(c+d x)}{(a+i a \tan (c+d x))^8} \, dx=\frac {{\mathrm {tan}\left (c+d\,x\right )}^3}{3\,a^8\,d}-\frac {31\,\mathrm {tan}\left (c+d\,x\right )}{a^8\,d}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,4{}\mathrm {i}}{a^8\,d}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,80{}\mathrm {i}}{a^8\,d}-\frac {\frac {64}{a^8}+\frac {\mathrm {tan}\left (c+d\,x\right )\,80{}\mathrm {i}}{a^8}}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^2\,1{}\mathrm {i}+2\,\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )} \]

[In]

int(1/(cos(c + d*x)^12*(a + a*tan(c + d*x)*1i)^8),x)

[Out]

(tan(c + d*x)^2*4i)/(a^8*d) - (31*tan(c + d*x))/(a^8*d) - (log(tan(c + d*x) - 1i)*80i)/(a^8*d) + tan(c + d*x)^
3/(3*a^8*d) - ((tan(c + d*x)*80i)/a^8 + 64/a^8)/(d*(2*tan(c + d*x) + tan(c + d*x)^2*1i - 1i))